package com.springboot.springtest.Service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.springboot.springtest.Mapper.UserMapper;
import com.springboot.springtest.Pojo.User;
import com.springboot.springtest.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wwj
 * @date 2021/3/11 0011 15:10
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userDao;



    @Override
    public List<User> UserList() {
        return userDao.UserList();
    }

    @Override
    public User queryById(String id) {
        return userDao.queryById(id);
    }

    @Override
    public List<User> queryAllByLimit(int offset, int limit) {
        return userDao.queryAllByLimit(offset,limit);
    }

    @Override
    public void insert(User user) {
        userDao.insert(user);
    }

    @Override
    public void update(User user) {
            userDao.update(user);
    }


    @Override
    public boolean deleteById(String id) {
        return userDao.deleteById(id);
    }

   public List<User> queryAll(User user){
      return   userDao.queryAll(user);
    }
}
